Because debugging and writing debug information to a log file is time consuming and expensive, SmartZone OCR provides the ability to control the level of information written to the debug log as well as the ability to turn off writing to a file completely.
Control Debugging Information
Use the methods and properties below to adjust the settings of your debugging for optimal performance.
- Debug - Turns on or off the ability to write to the debug log file.
- DebugLogFile - A filename which stores the debug log information.
- ErrorLevel - Controls the amount of information that is written to the debug log file.
To set up the DebugLogFile to obtain information for one or more components, simply set up each Debug Log File to go to the same designated File as shown below in the code snippet:
C# Example | Copy Code |
---|---|
… // set the directory and name. The log file always goes to temp by default string logFileName = System.Environment.GetFolderPath(Environment.SpecialFolder.Personal) + "temp\\DebugFile.log"; // Set the error level and debug log file for FormDirector myFormDirector.ErrorLevel = Accusoft.FormDirectorSdk.ErrorLevel.Detailed; myFormDirector.DebugLogFile = logFileName; myFormDirector.Debug = true; // Set the error level and debug log file for FormFix myFormFix.ErrorLevel = Accusoft.FormFixSdk.ErrorLevel.Detailed; myFormFix.DebugLogFile = logFileName; myFormFix.Debug = true; // Set the error level and debug log file for ScanFix myScanFix.ErrorLevel = Accusoft.ScanFixXpressSdk.ErrorLevel.Detailed; myScanFix.DebugLogFile = logFileName; myScanFix.Debug = true; // Set the error level and debug log file for SmartZone OCR mySmartZoneOCR.ErrorLevel = Accusoft.SmartZoneOCR.SDK.ErrorLevelInfo.Detailed; mySmartZoneOCR.DebugLogFile = logFileName; mySmartZoneOCR.Debug = true; … |